package com.kpmg.datalake.common.enums;

/**
 * @author Tim
 * @author alex [alex.zhao@kpmg.com]
 * @create 2018-05-30
 * @desc 系统控件默认值的配置, 包含了code, 以及对应的控件默认值匹配的表名, 返回前端的json文件的属性名. 开发人员可动态扩展该枚举属性.
 */
public enum SysOptionCodeEnum {
    /**
     * CORP("CORP", "客户", "", "KPMG_DIM_CORP", "coprCd", "corpNm")
     */
    CORP("CORP", "客户", "", "KPMG_DIM_CORP", "coprCd", "corpNm"),
    /**
     * CST("CST", "交易对手", "", "KPMG_DIM_CST", "cstCd","cstNm")
     */
    CST("CST", "交易对手", "", "KPMG_DIM_CST", "cstCd", "cstNm"),
    /**
     * DEPT("DEPT", "部门", "", "KPMG_DIM_DEPT", "deptCd", "deptNm")
     */
    DEPT("DEPT", "部门", "", "KPMG_DIM_DEPT", "deptCd", "deptNm"),
    /**
     * PRJ("PRJ", "组团", "", "KPMG_DIM_PRJ","prjCd", "prjNm")
     */
    PRJ("PRJ", "组团", "", "KPMG_DIM_PRJ", "prjCd", "prjNm"),
    /**
     * START_DATE("START_DATE", "开始日期", "", "", "defaultStartDate","startDate")
     */
    START_DATE("START_DATE", "开始日期", "", "", "defaultStartDate", "startDate"),
    /**
     * END_DATE("END_DATE", "结束日期", "", "", "defaultEndDate","endDate")
     */
    END_DATE("END_DATE", "结束日期", "", "", "defaultEndDate", "endDate"),
    /**
     * ACCOUNT_BOOK("ACCOUNT_BOOK", "账套", "", "", "", "")
     */
    ACCOUNT_BOOK("ACCOUNT_BOOK", "账套", "", "", "", "");

	/**
	 * 代码code, 应该与字典表中定义的一致. 目前字典表并未创建, 后期需要注意
	 */
	private final String code;
	/**
	 * 名字
	 */
	private final String name;
	/**
	 * 说明, 可为空
	 */
	private final String desc;
	/**
	 * 该code对应的表名, 可用于查询获取其他属性
	 */
	private final String matchedTableName;
	/**
	 * 该code返回前端Json中的属性
	 */
	private final String jsonCodeAttr;
	/**
	 * 该code返回前段Json中名称的属性
	 */
	private final String jsonNameAttr;

    SysOptionCodeEnum(String code, String name, String desc, String matchedTableName, String jsonCodeAttr,
                      String jsonNameAttr) {
		this.code = code;
		this.name = name;
		this.desc = desc;
		this.matchedTableName = matchedTableName;
		this.jsonCodeAttr = jsonCodeAttr;
		this.jsonNameAttr = jsonNameAttr;
	}

	public String getCode() {
		return code;
	}

	public String getName() {
		return name;
	}

	public String getDesc() {
		return desc;
	}

	public String getMatchedTableName() {
		return matchedTableName;
	}

	public String getJsonCodeAttr() {
		return jsonCodeAttr;
	}

	public String getJsonNameAttr() {
		return jsonNameAttr;
	}

}
